* buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 01:15:33 +0000 (18:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 01:15:33 +0000 (18:15 -0700)
The old code sometimes used this field without initializing it.

src/ChangeLog
src/buffer.c

index 6e146a773e334fdbbb6eda44e9e4b720201b7269..f0cac5e09a4855b3195c972bfa79290dd510e4d7 100644 (file)
@@ -1,5 +1,8 @@
 2011-07-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
+       The old code sometimes used this field without initializing it.
+
        * alloc.c (gc_sweep): Don't read past end of array.
        In theory, the old code could also have corrupted Emacs internals,
        though it'd be very unlikely.
index 1b8b1117893e427eed58ca139e6524ce8818b3e9..776888e30acfc0a4fee0a210b077d7c2ab6ea105 100644 (file)
@@ -361,6 +361,7 @@ even if it is dead.  The return value is never nil.  */)
   BUF_END_UNCHANGED (b) = 0;
   BUF_BEG_UNCHANGED (b) = 0;
   *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'.  */
+  b->text->inhibit_shrinking = 0;
 
   b->newline_cache = 0;
   b->width_run_cache = 0;